<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->
<HTML>
<HEAD>
<TITLE>Create from.. (massive)</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"></META>
  <LINK rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Popup/Popup.css" id="paramCSS"></LINK>
  <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
  <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
  <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
  <SCRIPT language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></SCRIPT>
  <SCRIPT language="JavaScript" type="text/javascript" id="paramDirection">var baseDirection = "../../../../../web/";</SCRIPT>
  <SCRIPT language="JavaScript" type="text/javascript" id="paramLanguage">LNG_POR_DEFECTO = "en_US";</SCRIPT>
  <SCRIPT language="JavaScript" src="../utility/MessagesJS.js" type="text/javascript"></SCRIPT>
  <SCRIPT language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></SCRIPT>
  <SCRIPT language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></SCRIPT>
  <SCRIPT language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></SCRIPT>
  <script language="JavaScript" type="text/javascript" id="keyMap"></script>
<SCRIPT language="JavaScript" type="text/javascript">

activarControlTeclas();

function marcarTodosDatos(chk, bolMarcar)
{
  if (bolMarcar==null) bolMarcar = false;
  if (!chk) return false;
  else if (!chk.length) {
    chk.checked = bolMarcar;
    loadData(chk.value, bolMarcar);
  } else {
    var total = chk.length;
    for (var i=0;i<total;i++) {
      chk[i].checked = bolMarcar;
      loadData(chk[i].value, bolMarcar);
    }
  }
  return true;
}

var state=false;
function loadData(value, enable) {
  if (enable == null) enable = false;
  document.frmMain.elements["inpLastpriceso" + value].disabled = !enable;
  if ( !document.frmMain.elements["inpLastpriceso" + value].disabled )
  {
    document.frmMain.elements["inpLastpriceso" + value].className = document.frmMain.elements["inpLastpriceso" + value].className.replace(' readonly', '');
  } else if ( !document.frmMain.elements["inpLastpriceso" + value].enable ){
    document.frmMain.elements["inpLastpriceso" + value].className += " readonly";
  }
  document.frmMain.elements["inpquantity" + value].disabled = !enable;
  if ( !document.frmMain.elements["inpquantity" + value].disabled )
  {
    document.frmMain.elements["inpquantity" + value].className = document.frmMain.elements["inpquantity" + value].className.replace(' readonly', '');
  } else if ( !document.frmMain.elements["inpquantity" + value].enable ){
    document.frmMain.elements["inpquantity" + value].className += " readonly";
  }
  return true;
}

function depurar(action) {
  var frm=document.frmMain;
  
  return true;
}
</SCRIPT>




  <script language="JavaScript" type="text/javascript">
    var selectedRow = "";
    function selectActual(obj) {
      if (selectedRow != "") {
        selectedRow.className = selectedRow.className.replace(' DataGrid_Body_Row_selected', '');
      }
      selectedRow = obj;
      selectedRow.className += " DataGrid_Body_Row_selected";
    }

    function checkActual(obj) {
      selectedCheck = selectedRow.id.toString().replace('funcEvenOddRow', 'CheckNum');
      document.getElementById(selectedCheck).checked = !document.getElementById(selectedCheck).checked;
      loadData(document.getElementById(selectedCheck).value,document.getElementById(selectedCheck).checked);
    }

    function HoverCell(cell) {
      cell.className = cell.className + ' DataGrid_Body_Cell_hover';
    }

    function unHoverCell(cell) {
      cell.className = cell.className.replace(' DataGrid_Body_Cell_hover', '');
    }
  </script>


</HEAD>


<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeArea();" onresize="resizeArea();">
<FORM id="form" method="POST" action="../ad_actionButton/CopyFromOrder_F1.html" name="frmMain">
<INPUT type="hidden" name="Command">
<INPUT type="hidden" name="IsPopUpCall" value="1"></INPUT>
<INPUT type="hidden" name="inpcOrderId" value="" id="paramKey"></INPUT>
<INPUT type="hidden" name="inpWindowId" value="" id="paramWindowId"></INPUT>
<INPUT type="hidden" name="inpTabId" value="" id="paramTabId"></INPUT>
<INPUT type="hidden" name="inpissotrx" value="" id="paramisSOTrx"></INPUT>

  <div class="Popup_ContentPane_CircleLogo">
    <div class="Popup_WindowLogo">
      <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
    </div>
  </div>

  <table cellspacing="0" cellpadding="0" width="100%">

    <tr>
      <td>
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_NavBar" id="tdToolBar">
          <tr class="Popup_NavBar_bg"><td></td>
            <td class="Popup_NavBar_separator_cell"></td>
            <td class="Popup_NavBar_bg_logo_left"></td>
            <td class="Popup_NavBar_bg_logo" width="1" onclick="abrirNuevoBrowser('http://www.openbravo.com', 'Openbravo');return false;"><IMG src="../../../../../web/images/blank.gif" alt="Openbravo" title="Openbravo" border="0" id="openbravoLogo" class="Popup_NavBar_logo" /></td>
            <td class="Popup_NavBar_bg_logo_right"></td>
            <td class="Popup_NavBar_Popup_title_cell"><span>Copy From Order</span></td>
            <td class="Popup_NavBar_separator_cell"></td>
          </tr>
        </table>
      </td>
    </tr>

    <tr>
      <td>
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar" id="tdbottomSeparator">
          <tr>
            <td class="Popup_SeparatorBar_bg"></td>
          </tr>
        </table>
      </td>
    </tr>

    <tr>
      <td>
        <div class="Popup_ContentPane_Client" style="overflow: auto;">

          <!-- MessageBox -->
          <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
            <TBODY>
            <tr class="MessageBox_TopMargin">
              <td class="MessageBox_LeftMargin"></td>
              <td></td>
              <td class="MessageBox_RightMargin"></td>
            </tr>
            <tr>
              <td class="MessageBox_LeftMargin"></td>
              <td>

                <table cellpadding="0" cellspacing="0" style="width: 100%;">
                  <TBODY>
                  <tr>
                    <td>
                      <div class="MessageBox_TopLeft"></div>
                      <div class="MessageBox_Left"></div>
                    </td>
                    <td class="MessageBox_bg">

                      <table class="MessageBox_Top">
                      <TBODY>
                        <tr>
                          <td>
                            <span>
                            <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
                              <TBODY>
                              <tr>
                                <td class="MessageBox_Icon_ContentCell">
                                  <div class="MessageBox_Icon"></div>
                                </td>
                                <td style="vertical-align: top;" id="messageBoxIDContent">
                                  <span>
                                    <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
                                      xxInfo: AccessTableWithNoView
                                    </div>
                                    <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
                                      xxThe current information is empty.
                                    </div>
                                    <div class="MessageBox_TextSeparator"></div>
                                  </span>
                                </td>
                              </tr>
                              </TBODY>
                            </table>
                            </span>
                          </td>
                        </tr>
                        </TBODY>
                      </table>

                    </td>
                    <td class="MessageBox_RightTrans">
                      <div class="MessageBox_TopRight"></div>
                      <div class="MessageBox_Right"></div>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2" class="MessageBox_BottomLeft">
                    </td>
                    <td class="MessageBox_BottomTrans MessageBox_bg">
                    </td>
                    <td rowspan="2" class="MessageBox_BottomRight">
                    </td>
                  </tr>
                  <tr>
                    <td class="MessageBox_Bottom">
                    </td>
                  </tr>
                  </TBODY>
                </table>

              </td>
              <td class="MessageBox_RightMargin"></td>
            </tr>
            <tr class="MessageBox_BottomMargin">
              <td class="MessageBox_LeftMargin"></td>
              <td></td>
                <td class="MessageBox_RightMargin"></td>
              </tr>
            </TBODY>
          </table>
        <!-- MessageBox END -->


          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector" id="tdtopTabs">
            <tr>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
            </tr>

            <TR>
              <td colspan="6">
                <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
                <tbody>
                  <tr class="FieldGroup_TopMargin"/>
                  <tr>
                    <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                    <td class="FieldGroupTitle">Business Partner</td>
                    <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                    <td class="FieldGroupContent"/>
                  </tr>
                  <tr class="FieldGroup_BottomMargin"/>
                </tbody>
                </table>
              </td>
            </TR>

            <tr>
              <TD class="TitleCell"><SPAN class="LabelText">Name</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramBpartnername">xxBPartner</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">Organization</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramOrgname">xxPamplona</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">Contact</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramContact">xxContact</SPAN></TD>
            </tr>
            <tr>
              <TD class="TitleCell"><SPAN class="LabelText">Pending delivery/receipt</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramPendingdelivery">xxxx12345</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">Pending invoice</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramPendingInvoice">xx3456</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">Pending debt payment</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramDebtpending">xxx1234.5</SPAN></TD>
            </tr>
            <tr>
              <TD class="TitleCell"><SPAN class="LabelText">Last order</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramLastorder">xx25/04/2001</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">Invoiced&nbsp;<span id="paramYearactual">xx2006</span></SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramInvoicing">xx23464.4</SPAN></TD>
              <TD class="TitleCell"><SPAN class="LabelText">% total</SPAN></TD>
              <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="paramTotalAverage">xx15</SPAN></TD>
            </tr>

            <TR>
              <td colspan="6">
                <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
                <tbody>
                  <tr class="FieldGroup_TopMargin"/>
                  <tr>
                    <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                    <td class="FieldGroupTitle">Order</td>
                    <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                    <td class="FieldGroupContent"/>
                  </tr>
                  <tr class="FieldGroup_BottomMargin"/>
                </tbody>
                </table>
              </td>
            </TR>

            <div id="sectionDetail2">
              <tr>
                <TD class="TitleCell"><SPAN class="LabelText">Order No.</SPAN></TD>
                <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="fieldDocumentno">xxxx12345</SPAN></TD>
                <TD class="TitleCell"><SPAN class="LabelText">Reference No</SPAN></TD>
                <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="fieldPoreference">xx3456</SPAN></TD>
                <TD class="TitleCell"><SPAN class="LabelText">Date ordered</SPAN></TD>
                <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="fieldDateordered">xxx25/01/1900</SPAN></TD>
              </tr>
              <tr>
                <TD class="TitleCell"><SPAN class="LabelText">Price list</SPAN></TD>
                <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="fieldPricelistname">xxPricelist1</SPAN></TD>
                <TD class="TitleCell"><SPAN class="LabelText">Ship to</SPAN></TD>
                <TD class="ReadOnly_Text_ContentCell"><SPAN class="Label_ReadOnly_Text" id="fieldLocationname">xxHermanos Imaz 123</SPAN></TD>
                <TD></TD>
                <TD></TD>
              </tr>
            </div>

            <tr>
              <td colspan="6">
                <table class="RelationInfo">
                  <tr>
                    <td class="RelationInfoContent">Products sales/purchase the last <span id="paramLastmonth">xx2</span> days</td>
                  </tr>
                </table>
              </td>
            </tr>

          </table>


          <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">

            <tr>
              <td valign="top" class="Popup_Client_Selector_DataGrid_LeftMargin">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdleftSeparator">
                  <tr><td class="Popup_Client_Selector_DataGrid_LeftMargin"></td></tr>
                </table>
              </td>
              <td valign="top">
                <div style="overflow: auto; display: none;" id="client">
                  <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                    <tr class="DataGrid_Body_Row">
                      <TH width="24px" class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox"><INPUT class="DataGrid_CheckBox" type="checkbox" name="inpTodos" onclick="marcarTodosDatos(document.frmMain.inpRownumId, this.checked);return true;"></INPUT></TH>
                      <TH width="20%" class="DataGrid_Header_Cell">Product</TH>
                      <TH width="9%"  class="DataGrid_Header_Cell">Attribute</TH>
                      <TH width="11%" class="DataGrid_Header_Cell">Offer</TH>
                      <TH width="9%"  class="DataGrid_Header_Cell">Price</TH>
                      <TH width="9%"  class="DataGrid_Header_Cell">Last price</TH>
                      <TH width="7%"  class="DataGrid_Header_Cell">Quantity</TH>
                      <TH width="13%" class="DataGrid_Header_Cell">UOM</TH>
                      <TH width="11%" class="DataGrid_Header_Cell">Tax</TH>
                    </TR>
                    <DIV id="sectionDetail">
                      <TR class="DataGrid_Body_Row DataGrid_Body_Row_yy" onclick="selectActual(this); return true;" ondblclick="checkActual(this); return true;" id="funcEvenOddRowxx"> 
                        <TD width="2%" class="DataGrid_Body_LineNoCell DataGrid_Body_Cell_CheckBox">
                          <INPUT type="checkbox" name="inpRownumId" onclick="loadData(this.value, this.checked);return true;" id="CheckNumxx" value="xx"></INPUT>
                        </TD>
                        <TD width="20%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);" id=""><INPUT type="hidden" name="inpmProductIdxx" id="fieldProductid" value=""></INPUT><span id="fieldProductname">xxPimientos de vinagre</span></TD>
                        <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmAttributesetinstanceIdxx" id="fieldmAttributesetinstanceId" value=""></INPUT><span id="fieldDescription">xxExtraLarge</span></TD>
                        <TD width="11%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmOfferIdxx" id="fieldMofferid" value=""></INPUT><span id="fieldOffername">xx15%descuentoFebrero</span></TD>
                        <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmPricestdvaluexx" id="fieldPricestdvalue" value=""></INPUT><span id="fieldPricestd">xx15.345</span></TD>
                        <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpLastpricesoxx" type="text" id="fieldLastpriceso" size="6" value="" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" class="xx"></INPUT></TD>
                        <TD width="7%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpquantityxx" type="text" id="fieldQty" size="5" value="0" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" ></INPUT></TD>
                        <TD width="13%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpcUOMIdxx" id="fieldUomid" value=""></INPUT><span id="fieldUomsymbol">xxKg</span></TD>
                        <TD width="11%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpcTaxIdxx" id="fieldTaxid" value=""></INPUT><span id="fieldNametax">xx16%</span></TD>
                      </TR>
                    </DIV>
                  </TABLE>

                        
                </div>

              </td>

              <td valign="top" class="Popup_Client_Selector_DataGrid_RightMargin">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdrightSeparator">
                  <tr><td class="Popup_Client_Selector_DataGrid_RightMargin"></td></tr>
                </table>
              </td>
            </tr>
          </table>




        </div>
      </td>
    </tr>
  </table>

</form>
</body>
</html>
